package editor.windows;

import adventure.commands.skills.Skill;
import adventure.commands.skills.SkillManager;
import adventure.placeable.Item;
import adventure.placeable.Mobile;
import adventure.placeable.PlaceableManager;
import adventure.placeable.PlaceableManagerEdit;
import adventure.placeable.trigger.Trigger;
import adventure.placeable.trigger.TriggerEdit;
import adventure.placeable.trigger.results.ResultModifyPlayer;
import adventure.placeable.trigger.results.ResultModifyRoom;
import adventure.placeable.trigger.results.ResultMovePlayer;
import adventure.placeable.trigger.results.ResultSpawnItem;
import adventure.placeable.trigger.results.ResultSpawnMobile;
import adventure.placeable.trigger.results.ResultSpawnTrigger;
import adventure.placeable.trigger.results.ResultString;
import adventure.placeable.trigger.results.TriggerResult;
import java.awt.Color;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JCheckBox;
import javax.swing.JFormattedTextField;
import player.BookEntry;
import player.BookEntryImp;

/**
 *
 * @author Michael Hanns
 *
 */
public class DialogAddTriggerResultView extends javax.swing.JDialog {

    private static final long serialVersionUID = -3725149007295603417L;
    private TriggerEdit trigger;
    private PlaceableManager placeables;
    private SkillManager skills;
    private WITNAFrameView parent;
    private JFormattedTextField[] fields;
    private JCheckBox[] checkBoxes;

    /** Creates new form DialogAddTriggerResultView */
    public DialogAddTriggerResultView(java.awt.Frame parent,
            TriggerEdit t, PlaceableManager p, SkillManager s) {
        super(parent, true);
        this.parent = (WITNAFrameView) parent;
        initComponents();
        this.trigger = t;
        this.placeables = p;
        this.skills = s;
        setupFieldChangers();
        updateSubtypeBoxes();
    }
    
    // Used to initialise an array of JFormattedTextFields for
    // setFieldBackgroundColour() method way below. This is just a time saver
    // to make a workaround more maintainable.
     private void setupFieldChangers() {
        this.fields = new JFormattedTextField[] {
            usesField, itemField, mobileField, triggerField, quantityField,
            integerField, skillField, xField, yField, zField, textField};
        this.checkBoxes = new JCheckBox[] {
            closedN, closedE, closedS, closedW, closedU, closedD,
            lockedN, lockedE, lockedS, lockedW, lockedU, lockedD,
            blockedN, blockedE, blockedS, blockedW, blockedU, blockedD
        };
    }

    private void updateSubtypeBoxes() {
        if (spawnRadio.isSelected()) {
            DefaultComboBoxModel model = new DefaultComboBoxModel();
            model.addElement("ITEM");
            model.addElement("MOBILE");
            model.addElement("TRIGGER");
            objectComboBox.setModel(model);
            updateAttributeBox();
            setEnabledBoxes();
        } else if (modifyRadio.isSelected()) {
            DefaultComboBoxModel model = new DefaultComboBoxModel();
            model.addElement("ROOM");
            model.addElement("PLAYER");
            objectComboBox.setModel(model);
            updateAttributeBox();
            setEnabledBoxes();
        } else if (textRadio.isSelected()) {
            DefaultComboBoxModel model = new DefaultComboBoxModel();
            model.addElement("DEFAULT");
            objectComboBox.setModel(model);
            updateAttributeBox();
            setEnabledBoxes();
        }
    }
    
    private void updateObjectBox() {
        updateAttributeBox();
        if (modifyRadio.isSelected()) {
            setEnabledBoxes();
        } else if (spawnRadio.isSelected()) {
            setEnabledBoxes();
        } else if (textRadio.isSelected()) {
            setEnabledBoxes();
        }
    }
    
    private void updateAttributeBox() {
        String object = objectComboBox.getSelectedItem().toString();
        DefaultComboBoxModel model = new DefaultComboBoxModel();
        if (spawnRadio.isSelected()) {
            model.addElement("DEFAULT");
        } else if (textRadio.isSelected()) {
            model.addElement("DEFAULT");
        } else {
            if (object.equalsIgnoreCase("ITEM")) {
                model.addElement("DEFAULT");
            } else if (object.equalsIgnoreCase("ROOM")) {
                model.addElement("TITLE");
                model.addElement("DESCRIPTION");
                model.addElement("BLOCKED");
                model.addElement("LOCKED");
                model.addElement("CLOSED");
                model.addElement("CURRENCY");
                model.addElement("REMOVEITEM");
                model.addElement("REMOVEMOBILE");
                model.addElement("REMOVETRIGGER");
            } else if (object.equalsIgnoreCase("PLAYER")) {
                model.addElement("CURRENCY");
                model.addElement("XP");
                model.addElement("HEALTH");
                model.addElement("MAXHEALTH");
                model.addElement("SPECIAL");
                model.addElement("MAXSPECIAL");
                model.addElement("ATTACK");
                model.addElement("DEFENCE");
                model.addElement("INTEL");
                model.addElement("SPEED");
                model.addElement("LUCK");
                model.addElement("LEARNSKILL");
                model.addElement("FORGETSKILL");
                model.addElement("LOCATION");
                model.addElement("GIVEITEM");
                model.addElement("TAKEITEM");
                model.addElement("COMPLETELOG");
                model.addElement("ADDLOG");
            }
        }
        attributeComboBox.setModel(model);
    }
    
    private void setEnabledBoxes() {
        if (spawnRadio.isSelected()) {
            setEnabledBoxesSpawn();
        } else if (modifyRadio.isSelected()) {
            setEnabledBoxesModify();
        } else if (textRadio.isSelected()) {
            setEnabledBoxesString();
        }
        clearFieldsAndSetBackgroundColour();
    }

    private void setEnabledBoxesSpawn() {
        quantityField.setEnabled(false);
        integerField.setEnabled(false);
        textField.setEnabled(false);
        xField.setEnabled(false);
        yField.setEnabled(false);
        zField.setEnabled(false);

        closedN.setEnabled(false);
        closedE.setEnabled(false);
        closedS.setEnabled(false);
        closedW.setEnabled(false);
        closedU.setEnabled(false);
        closedD.setEnabled(false);

        blockedN.setEnabled(false);
        blockedE.setEnabled(false);
        blockedS.setEnabled(false);
        blockedW.setEnabled(false);
        blockedU.setEnabled(false);
        blockedD.setEnabled(false);

        lockedN.setEnabled(false);
        lockedE.setEnabled(false);
        lockedS.setEnabled(false);
        lockedW.setEnabled(false);
        lockedU.setEnabled(false);
        lockedD.setEnabled(false);
        
        skillField.setEnabled(false);

        Color c = new Color(240, 240, 240);
        entryDescBox.setEnabled(false);
        entryDescBox.setBackground(c);
        compEntryDescBox.setEnabled(false);
        compEntryDescBox.setBackground(c);
        if (objectComboBox.getSelectedItem().toString().equals("ITEM")) {
            itemField.setEnabled(true);
            mobileField.setEnabled(false);
            triggerField.setEnabled(false);
        } else if (objectComboBox.getSelectedItem().toString().equals("MOBILE")) {
            itemField.setEnabled(false);
            mobileField.setEnabled(true);
            triggerField.setEnabled(false);
        } else if (objectComboBox.getSelectedItem().toString().equals("TRIGGER")) {
            itemField.setEnabled(false);
            mobileField.setEnabled(false);
            triggerField.setEnabled(true);
        }
    }

    private void setEnabledBoxesModify() {
        quantityField.setEnabled(false);
        integerField.setEnabled(false);
        textField.setEnabled(false);
        xField.setEnabled(false);
        yField.setEnabled(false);
        zField.setEnabled(false);

        closedN.setEnabled(false);
        closedE.setEnabled(false);
        closedS.setEnabled(false);
        closedW.setEnabled(false);
        closedU.setEnabled(false);
        closedD.setEnabled(false);

        blockedN.setEnabled(false);
        blockedE.setEnabled(false);
        blockedS.setEnabled(false);
        blockedW.setEnabled(false);
        blockedU.setEnabled(false);
        blockedD.setEnabled(false);

        lockedN.setEnabled(false);
        lockedE.setEnabled(false);
        lockedS.setEnabled(false);
        lockedW.setEnabled(false);
        lockedU.setEnabled(false);
        lockedD.setEnabled(false);

        itemField.setEnabled(false);
        mobileField.setEnabled(false);
        triggerField.setEnabled(false);
        integerField.setEnabled(false);
        
        skillField.setEnabled(false);

        Color c = new Color(240, 240, 240);
        entryDescBox.setEnabled(false);
        entryDescBox.setBackground(c);
        compEntryDescBox.setEnabled(false);
        compEntryDescBox.setBackground(c);
        
        if (objectComboBox.getSelectedItem().toString().equals("PLAYER")) {
            String attribute = attributeComboBox.getSelectedItem().toString();
            itemField.setEnabled(false);
            mobileField.setEnabled(false);
            triggerField.setEnabled(false);
            integerField.setEnabled(false);
            textField.setEnabled(false);
            if (attribute.equalsIgnoreCase("HEALTH")
                    || attribute.equalsIgnoreCase("MAXHEALTH")
                    || attribute.equalsIgnoreCase("SPECIAL")
                    || attribute.equalsIgnoreCase("MAXSPECIAL")
                    || attribute.equalsIgnoreCase("XP")
                    || attribute.equalsIgnoreCase("ATTACK")
                    || attribute.equalsIgnoreCase("DEFENCE")
                    || attribute.equalsIgnoreCase("SPEED")
                    || attribute.equalsIgnoreCase("LUCK")
                    || attribute.equalsIgnoreCase("COMPLETELOG")) {
                integerField.setEnabled(true);
            } else if (attribute.equalsIgnoreCase("CURRENCY")) {
                quantityField.setEnabled(true);
            } else if (attribute.equalsIgnoreCase("GIVEITEM")
                    || attribute.equalsIgnoreCase("TAKEITEM")) {
                itemField.setEnabled(true);
            } else if (attribute.equalsIgnoreCase("LEARNSKILL")
                    || attribute.equalsIgnoreCase("FORGETSKILL")) {
                skillField.setEnabled(true);
            } else if (attribute.equalsIgnoreCase("ADDLOG")) {
                integerField.setEnabled(true);
                textField.setEnabled(true);
                entryDescBox.setEnabled(true);
                entryDescBox.setBackground(Color.white);
                compEntryDescBox.setEnabled(true);
                compEntryDescBox.setBackground(Color.white);
            } else if (attribute.equalsIgnoreCase("LOCATION")) {
                xField.setEnabled(true);
                yField.setEnabled(true);
                zField.setEnabled(true);
            }
        } else if (objectComboBox.getSelectedItem().toString().equals("ROOM")) {
            String attribute = attributeComboBox.getSelectedItem().toString();

            if (attribute.equals("CLOSED")) {
                closedN.setEnabled(true);
                closedE.setEnabled(true);
                closedS.setEnabled(true);
                closedW.setEnabled(true);
                closedU.setEnabled(true);
                closedD.setEnabled(true);
            } else if (attribute.equals("BLOCKED")) {
                blockedN.setEnabled(true);
                blockedE.setEnabled(true);
                blockedS.setEnabled(true);
                blockedW.setEnabled(true);
                blockedU.setEnabled(true);
                blockedD.setEnabled(true);
            } else if (attribute.equals("LOCKED")) {
                lockedN.setEnabled(true);
                lockedE.setEnabled(true);
                lockedS.setEnabled(true);
                lockedW.setEnabled(true);
                lockedU.setEnabled(true);
                lockedD.setEnabled(true);
            } else if (attribute.equals("CURRENCY")) {
                quantityField.setEnabled(true);
            } else if (attribute.equalsIgnoreCase("REMOVEITEM")) {
                itemField.setEnabled(true);
            } else if (attribute.equalsIgnoreCase("REMOVEMOBILE")) {
                mobileField.setEnabled(true);
            } else if (attribute.equalsIgnoreCase("REMOVETRIGGER")) {
                triggerField.setEnabled(true);
            } else {
                textField.setEnabled(true);
            }
        }
    }

    private void setEnabledBoxesString() {
        xField.setEnabled(false);
        yField.setEnabled(false);
        zField.setEnabled(false);
        quantityField.setEnabled(false);
        integerField.setEnabled(false);
        textField.setEnabled(false);
        itemField.setEnabled(true);
        mobileField.setEnabled(true);
        triggerField.setEnabled(true);
        skillField.setEnabled(true);
        Color c = new Color(240, 240, 240);
        entryDescBox.setEnabled(false);
        entryDescBox.setBackground(c);
        compEntryDescBox.setEnabled(false);
        compEntryDescBox.setBackground(c);

        closedN.setEnabled(false);
        closedE.setEnabled(false);
        closedS.setEnabled(false);
        closedW.setEnabled(false);
        closedU.setEnabled(false);
        closedD.setEnabled(false);

        blockedN.setEnabled(false);
        blockedE.setEnabled(false);
        blockedS.setEnabled(false);
        blockedW.setEnabled(false);
        blockedU.setEnabled(false);
        blockedD.setEnabled(false);

        lockedN.setEnabled(false);
        lockedE.setEnabled(false);
        lockedS.setEnabled(false);
        lockedW.setEnabled(false);
        lockedU.setEnabled(false);
        lockedD.setEnabled(false);
    }

    private String getClosedString() {
        String out = "";
        if (closedN.isSelected()) {
            out += "N";
        }
        if (closedE.isSelected()) {
            out += "E";
        }
        if (closedS.isSelected()) {
            out += "S";
        }
        if (closedW.isSelected()) {
            out += "W";
        }
        if (closedU.isSelected()) {
            out += "U";
        }
        if (closedD.isSelected()) {
            out += "D";
        }
        return out;
    }

    private String getLockedString() {
        String out = "";
        if (lockedN.isSelected()) {
            out += "N";
        }
        if (lockedE.isSelected()) {
            out += "E";
        }
        if (lockedS.isSelected()) {
            out += "S";
        }
        if (lockedW.isSelected()) {
            out += "W";
        }
        if (lockedU.isSelected()) {
            out += "U";
        }
        if (lockedD.isSelected()) {
            out += "D";
        }
        return out;
    }

    private String getBlockedString() {
        String out = "";
        if (blockedN.isSelected()) {
            out += "N";
        }
        if (blockedE.isSelected()) {
            out += "E";
        }
        if (blockedS.isSelected()) {
            out += "S";
        }
        if (blockedW.isSelected()) {
            out += "W";
        }
        if (blockedU.isSelected()) {
            out += "U";
        }
        if (blockedD.isSelected()) {
            out += "D";
        }
        return out;
    }
    
    private void clearFieldsAndSetBackgroundColour() {
        for(int x=0; x<fields.length; x++) {
            if(fields[x].isEnabled()) {
                fields[x].setBackground(Color.white);
            } else {
                fields[x].setBackground(new Color(240, 240, 240));
                fields[x].setText("");
            }
        }
        for(int x=0; x<checkBoxes.length; x++) {
            if(!checkBoxes[x].isEnabled()) {
                checkBoxes[x].setSelected(false);
            }
        }
    }

    private int parseInt(String text) {
        try {
            int i = Integer.parseInt(text);
            return i;
        } catch (NumberFormatException e) {
            return 0;
        }
    }


    private TriggerResult getSpawnResult() {
        TriggerResult result;
        if (objectComboBox.getSelectedItem().toString().equals("ITEM")) {
            Item i = placeables.getItem(parseInt(itemField.getText()));
            if (!limitedUsesCheckBox.isSelected()) {
                result = new ResultSpawnItem(resultTextField.getText(), i);
            } else {
                result = new ResultSpawnItem(resultTextField.getText(),
                        parseInt(usesField.getText()), i);
            }
        } else if (objectComboBox.getSelectedItem().toString().equals("MOBILE")) {
            Mobile m = placeables.getMobile(parseInt(mobileField.getText()));
            if (!limitedUsesCheckBox.isSelected()) {
                result = new ResultSpawnMobile(resultTextField.getText(), m);
            } else {
                result = new ResultSpawnMobile(resultTextField.getText(),
                        parseInt(usesField.getText()), m);
            }
        } else {
            Trigger tr = placeables.getTrigger(parseInt(triggerField.getText()));
            if (!limitedUsesCheckBox.isSelected()) {
                result = new ResultSpawnTrigger(resultTextField.getText(), tr);
            } else {
                result = new ResultSpawnTrigger(resultTextField.getText(),
                        parseInt(usesField.getText()), tr);
            }
        }
        result.setPublicResult(publicCheckBox.isSelected());
        return result;
    }

    private TriggerResult getModifyResult() {
        System.out.println("Getting modify result");
        TriggerResult result;
        String attribute = attributeComboBox.getSelectedItem().toString();
        String strMod = textField.getText();
        int intMod = 0;
        if (attribute.equals("CURRENCY")) {
            intMod = parseInt(quantityField.getText());
        } else if (attribute.equals("LEARNSKILL")
                || attribute.equals("FORGETSKILL")) {
            intMod = parseInt(skillField.getText());
        } else if (attribute.equals("REMOVEITEM")) {
            intMod = parseInt(itemField.getText());
        } else if (attribute.equals("REMOVEMOBILE")) {
            intMod = parseInt(mobileField.getText());
        } else if (attribute.equals("REMOVETRIGGER")) {
            intMod = parseInt(triggerField.getText());
        } else {
            intMod = parseInt(integerField.getText());
        }
        
        if (objectComboBox.getSelectedItem().toString().equals("ROOM")) {
            if (attribute.equals("LOCKED")) {
                strMod = getLockedString();
            } else if (attribute.equals("BLOCKED")) {
                strMod = getBlockedString();
            } else if (attribute.equals("CLOSED")) {
                strMod = getClosedString();
            }

            if (limitedUsesCheckBox.isSelected()) {
                if (attribute.equals("CURRENCY")) {
                    result = new ResultModifyRoom(resultTextField.getText(),
                            attribute, parseInt(usesField.getText()), intMod);
                } else {
                    result = new ResultModifyRoom(resultTextField.getText(),
                            attribute, parseInt(usesField.getText()), strMod);
                }
            } else {
                if (attribute.equals("CURRENCY")) {
                    result = new ResultModifyRoom(resultTextField.getText(),
                            attribute, intMod);
                } else {
                    result = new ResultModifyRoom(resultTextField.getText(),
                            attribute, strMod);
                }
            }
        } else {
            // aka if (objectComboBox.getSelectedItem().toString().equals("PLAYER"))
            if (attribute.equals("LOCATION")) {
                if (limitedUsesCheckBox.isSelected()) {
                    result = new ResultMovePlayer(resultTextField.getText(),
                            parseInt(usesField.getText()), parseInt(xField.getText()),
                            parseInt(yField.getText()), parseInt(zField.getText()));
                } else {
                    result = new ResultMovePlayer(resultTextField.getText(),
                            parseInt(xField.getText()), parseInt(yField.getText()),
                            parseInt(zField.getText()));
                }
            } else {
                if (attribute.equals("INTEL")) {
                    attribute = "INTELLIGENCE";
                }

                    Item i = placeables.getItem(parseInt(itemField.getText()));
                    Skill s = skills.getSkill(parseInt(skillField.getText()));
                    BookEntry e = new BookEntryImp(intMod,
                            textField.getText(), entryDescBox.getText(),
                            compEntryDescBox.getText());
                if (limitedUsesCheckBox.isSelected()) {
                    result = new ResultModifyPlayer(resultTextField.getText(),
                            attribute, parseInt(usesField.getText()),
                            intMod,
                            textField.getText(), i, s, e);
                } else {
                    result = new ResultModifyPlayer(resultTextField.getText(),
                            attribute, intMod,
                            textField.getText(), i, s, e);
                }
            }
        }
        result.setPublicResult(publicCheckBox.isSelected());
        return result;
    }
    
    private TriggerResult getStringResult() {
        TriggerResult result;
        Item i = placeables.getItem(parseInt(itemField.getText()));
        Mobile m = placeables.getMobile(parseInt(mobileField.getText()));
        Trigger tr = placeables.getTrigger(parseInt(triggerField.getText()));
        Skill s = skills.getSkill(parseInt(skillField.getText()));
        if (limitedUsesCheckBox.isSelected()) {
            result = new ResultString(resultTextField.getText(),
                    parseInt(usesField.getText()), i, m, tr, s);
        } else {
            result = new ResultString(resultTextField.getText(),
                    i, m, tr, s);
        }
        result.setPublicResult(publicCheckBox.isSelected());
        return result;
    }
    
    private void toggleLimitedUses() {
        if (limitedUsesCheckBox.isSelected()) {
            usesField.setEnabled(true);
            usesField.setText("" + 1);
        } else {
            usesField.setText("");
            usesField.setEnabled(false);
        }
    }
    
    private void addResult() {
        if (spawnRadio.isSelected()) {
            trigger.addResult(getSpawnResult());
        } else if (modifyRadio.isSelected()) {
            trigger.addResult(getModifyResult());
        } else if (textRadio.isSelected()) {
            trigger.addResult(getStringResult());
        }
        ((PlaceableManagerEdit) placeables).editTrigger((Trigger) trigger);
        parent.setUnsavedChanges(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        typeGroup = new javax.swing.ButtonGroup();
        addResultButton = new javax.swing.JButton();
        cancelButton = new javax.swing.JButton();
        modifierPanel = new javax.swing.JPanel();
        integerField = new javax.swing.JFormattedTextField();
        exitsPanel = new javax.swing.JPanel();
        closedD = new javax.swing.JCheckBox();
        lockedS = new javax.swing.JCheckBox();
        lockedE = new javax.swing.JCheckBox();
        lockedD = new javax.swing.JCheckBox();
        lockedU = new javax.swing.JCheckBox();
        lockedN = new javax.swing.JCheckBox();
        lockedW = new javax.swing.JCheckBox();
        lockedLabel = new javax.swing.JLabel();
        blockedS = new javax.swing.JCheckBox();
        blockedE = new javax.swing.JCheckBox();
        blockedU = new javax.swing.JCheckBox();
        blockedD = new javax.swing.JCheckBox();
        closedU = new javax.swing.JCheckBox();
        closedLabel = new javax.swing.JLabel();
        closedW = new javax.swing.JCheckBox();
        closedN = new javax.swing.JCheckBox();
        closedS = new javax.swing.JCheckBox();
        closedE = new javax.swing.JCheckBox();
        blockedW = new javax.swing.JCheckBox();
        lockedLabel1 = new javax.swing.JLabel();
        blockedN = new javax.swing.JCheckBox();
        attributeComboBox = new javax.swing.JComboBox();
        logPanel = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        compEntryDescBox = new javax.swing.JTextArea();
        entryDescLabel = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        entryDescBox = new javax.swing.JTextArea();
        compEntryDescLabel = new javax.swing.JLabel();
        objectComboBox = new javax.swing.JComboBox();
        locationPanel = new javax.swing.JPanel();
        zLabel = new javax.swing.JLabel();
        zField = new javax.swing.JFormattedTextField();
        xLabel = new javax.swing.JLabel();
        xField = new javax.swing.JFormattedTextField();
        yField = new javax.swing.JFormattedTextField();
        yLabel = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        textField = new javax.swing.JFormattedTextField();
        placeablesPanel = new javax.swing.JPanel();
        mobileField = new javax.swing.JFormattedTextField();
        triggerField = new javax.swing.JFormattedTextField();
        idLabel2 = new javax.swing.JLabel();
        idLabel1 = new javax.swing.JLabel();
        itemField = new javax.swing.JFormattedTextField();
        idLabel3 = new javax.swing.JLabel();
        skillField = new javax.swing.JFormattedTextField();
        skillLevel = new javax.swing.JLabel();
        resultTypePanel = new javax.swing.JPanel();
        textRadio = new javax.swing.JRadioButton();
        spawnRadio = new javax.swing.JRadioButton();
        modifyRadio = new javax.swing.JRadioButton();
        resultTextField = new javax.swing.JFormattedTextField();
        publicCheckBox = new javax.swing.JCheckBox();
        resultTextLabel = new javax.swing.JLabel();
        quantityPanel = new javax.swing.JPanel();
        quantityField = new javax.swing.JFormattedTextField();
        usesPanel = new javax.swing.JPanel();
        limitedUsesLabel = new javax.swing.JLabel();
        limitedUsesCheckBox = new javax.swing.JCheckBox();
        totalUsesLabel = new javax.swing.JLabel();
        usesField = new javax.swing.JFormattedTextField();
        publicLabel = new javax.swing.JLabel();
        attributeLabel = new javax.swing.JLabel();
        subtypeLabel = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Add Trigger Result..");
        setLocationByPlatform(true);

        addResultButton.setText("Add Result");
        addResultButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addResultButtonActionPerformed(evt);
            }
        });

        cancelButton.setText("Cancel");
        cancelButton.setMaximumSize(new java.awt.Dimension(85, 23));
        cancelButton.setMinimumSize(new java.awt.Dimension(85, 23));
        cancelButton.setPreferredSize(new java.awt.Dimension(85, 23));
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });

        modifierPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Value:"));

        integerField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        integerField.setColumns(3);
        integerField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        javax.swing.GroupLayout modifierPanelLayout = new javax.swing.GroupLayout(modifierPanel);
        modifierPanel.setLayout(modifierPanelLayout);
        modifierPanelLayout.setHorizontalGroup(
            modifierPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(modifierPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(integerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        modifierPanelLayout.setVerticalGroup(
            modifierPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(modifierPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(integerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        exitsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Exits:"));
        exitsPanel.setName("Exits"); // NOI18N

        closedD.setText("D");
        closedD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closedDActionPerformed(evt);
            }
        });

        lockedS.setText("S");

        lockedE.setText("E");
        lockedE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                lockedEActionPerformed(evt);
            }
        });

        lockedD.setText("D");

        lockedU.setText("U");

        lockedN.setText("N");

        lockedW.setText("W");

        lockedLabel.setText("Locked:");

        blockedS.setText("S");

        blockedE.setText("E");

        blockedU.setText("U");

        blockedD.setText("D");

        closedU.setText("U");
        closedU.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closedUActionPerformed(evt);
            }
        });

        closedLabel.setText("Closed:");

        closedW.setText("W");

        closedN.setText("N");
        closedN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closedNActionPerformed(evt);
            }
        });

        closedS.setText("S");

        closedE.setText("E");
        closedE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closedEActionPerformed(evt);
            }
        });

        blockedW.setText("W");
        blockedW.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                blockedWActionPerformed(evt);
            }
        });

        lockedLabel1.setText("Blocked:");

        blockedN.setText("N");

        javax.swing.GroupLayout exitsPanelLayout = new javax.swing.GroupLayout(exitsPanel);
        exitsPanel.setLayout(exitsPanelLayout);
        exitsPanelLayout.setHorizontalGroup(
            exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(exitsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(exitsPanelLayout.createSequentialGroup()
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(closedN)
                                    .addComponent(closedS, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(5, 5, 5)
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(closedU)
                                    .addComponent(closedD)))
                            .addComponent(closedLabel)))
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addComponent(closedW)
                        .addGap(9, 9, 9)
                        .addComponent(closedE)))
                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(lockedW)
                        .addGap(9, 9, 9)
                        .addComponent(lockedE))
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addGap(51, 51, 51)
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lockedLabel)
                            .addGroup(exitsPanelLayout.createSequentialGroup()
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(lockedS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(lockedN, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 0, 0)
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lockedU)
                                    .addComponent(lockedD))))))
                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addGap(51, 51, 51)
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(exitsPanelLayout.createSequentialGroup()
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(blockedN, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(blockedS, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(blockedD)
                                    .addComponent(blockedU)))
                            .addComponent(lockedLabel1)))
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(blockedW)
                        .addGap(9, 9, 9)
                        .addComponent(blockedE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        exitsPanelLayout.setVerticalGroup(
            exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(exitsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addComponent(closedLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(exitsPanelLayout.createSequentialGroup()
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(closedN)
                                    .addComponent(closedU))
                                .addGap(0, 0, 0)
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(closedW)
                                    .addComponent(closedE))
                                .addGap(0, 0, 0)
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(closedS)
                                    .addComponent(closedD)))
                            .addGroup(exitsPanelLayout.createSequentialGroup()
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lockedN)
                                    .addComponent(lockedU))
                                .addGap(0, 0, 0)
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lockedW)
                                    .addComponent(lockedE))
                                .addGap(0, 0, 0)
                                .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lockedS)
                                    .addComponent(lockedD)))))
                    .addGroup(exitsPanelLayout.createSequentialGroup()
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lockedLabel1)
                            .addComponent(lockedLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(blockedN)
                            .addComponent(blockedU))
                        .addGap(0, 0, 0)
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(blockedW)
                            .addComponent(blockedE))
                        .addGap(0, 0, 0)
                        .addGroup(exitsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(blockedS)
                            .addComponent(blockedD))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        attributeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "DEFAULT" }));
        attributeComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                attributeComboBoxActionPerformed(evt);
            }
        });

        logPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        compEntryDescBox.setColumns(20);
        compEntryDescBox.setLineWrap(true);
        compEntryDescBox.setRows(5);
        compEntryDescBox.setWrapStyleWord(true);
        jScrollPane2.setViewportView(compEntryDescBox);

        entryDescLabel.setText("Log Entry Description:");

        entryDescBox.setColumns(20);
        entryDescBox.setLineWrap(true);
        entryDescBox.setRows(5);
        entryDescBox.setWrapStyleWord(true);
        jScrollPane1.setViewportView(entryDescBox);

        compEntryDescLabel.setText("Log Entry Completed Description:");

        javax.swing.GroupLayout logPanelLayout = new javax.swing.GroupLayout(logPanel);
        logPanel.setLayout(logPanelLayout);
        logPanelLayout.setHorizontalGroup(
            logPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(logPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(logPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(entryDescLabel)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(logPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(compEntryDescLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap())
        );
        logPanelLayout.setVerticalGroup(
            logPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(logPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(logPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(entryDescLabel)
                    .addComponent(compEntryDescLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(logPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        objectComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "DEFAULT" }));
        objectComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                objectComboBoxActionPerformed(evt);
            }
        });

        locationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Location:"));

        zLabel.setText("Z:");

        zField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        zField.setColumns(3);
        zField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        xLabel.setText("X:");

        xField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        xField.setColumns(3);
        xField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        yField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        yField.setColumns(3);
        yField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        yLabel.setText("Y:");

        javax.swing.GroupLayout locationPanelLayout = new javax.swing.GroupLayout(locationPanel);
        locationPanel.setLayout(locationPanelLayout);
        locationPanelLayout.setHorizontalGroup(
            locationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(locationPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(xLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(xField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(yLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(yField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(zLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(zField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        locationPanelLayout.setVerticalGroup(
            locationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, locationPanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(locationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(xField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(xLabel)
                    .addComponent(yLabel)
                    .addComponent(yField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(zField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(zLabel))
                .addContainerGap())
        );

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Text/Log Entry Title:"));

        textField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        textField.setColumns(20);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(textField, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(textField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        placeablesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("IDs:"));

        mobileField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        mobileField.setColumns(3);
        mobileField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        triggerField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        triggerField.setColumns(3);
        triggerField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        idLabel2.setText("Mobile:");

        idLabel1.setText("Trigger:");

        itemField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        itemField.setColumns(3);
        itemField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        idLabel3.setText("Item:");

        skillField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        skillField.setColumns(3);
        skillField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        skillLevel.setText("Skill:");

        javax.swing.GroupLayout placeablesPanelLayout = new javax.swing.GroupLayout(placeablesPanel);
        placeablesPanel.setLayout(placeablesPanelLayout);
        placeablesPanelLayout.setHorizontalGroup(
            placeablesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(placeablesPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(idLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(itemField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(19, 19, 19)
                .addComponent(idLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(mobileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(19, 19, 19)
                .addComponent(idLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(triggerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(19, 19, 19)
                .addComponent(skillLevel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(skillField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        placeablesPanelLayout.setVerticalGroup(
            placeablesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, placeablesPanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(placeablesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(idLabel3)
                    .addComponent(idLabel2)
                    .addComponent(mobileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(itemField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(idLabel1)
                    .addComponent(triggerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(skillField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(skillLevel))
                .addContainerGap())
        );

        resultTypePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Result type:"));

        typeGroup.add(textRadio);
        textRadio.setSelected(true);
        textRadio.setText("Text");
        textRadio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textRadioActionPerformed(evt);
            }
        });
        textRadio.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                textRadioPropertyChange(evt);
            }
        });

        typeGroup.add(spawnRadio);
        spawnRadio.setText("Spawn");
        spawnRadio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                spawnRadioActionPerformed(evt);
            }
        });
        spawnRadio.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                spawnRadioPropertyChange(evt);
            }
        });

        typeGroup.add(modifyRadio);
        modifyRadio.setText("Modify");
        modifyRadio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                modifyRadioActionPerformed(evt);
            }
        });
        modifyRadio.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                modifyRadioPropertyChange(evt);
            }
        });

        javax.swing.GroupLayout resultTypePanelLayout = new javax.swing.GroupLayout(resultTypePanel);
        resultTypePanel.setLayout(resultTypePanelLayout);
        resultTypePanelLayout.setHorizontalGroup(
            resultTypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(resultTypePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(textRadio)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(spawnRadio)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(modifyRadio)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        resultTypePanelLayout.setVerticalGroup(
            resultTypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, resultTypePanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(resultTypePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textRadio)
                    .addComponent(spawnRadio)
                    .addComponent(modifyRadio))
                .addContainerGap())
        );

        resultTextField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));

        publicCheckBox.setSelected(true);
        publicCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                publicCheckBoxActionPerformed(evt);
            }
        });
        publicCheckBox.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                publicCheckBoxPropertyChange(evt);
            }
        });

        resultTextLabel.setText("Resulting text:");

        quantityPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Quantity:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Lucida Grande", 0, 12))); // NOI18N

        quantityField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        quantityField.setColumns(3);
        quantityField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));

        javax.swing.GroupLayout quantityPanelLayout = new javax.swing.GroupLayout(quantityPanel);
        quantityPanel.setLayout(quantityPanelLayout);
        quantityPanelLayout.setHorizontalGroup(
            quantityPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quantityPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(quantityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        quantityPanelLayout.setVerticalGroup(
            quantityPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(quantityPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(quantityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        usesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Uses:"));

        limitedUsesLabel.setText("Limited:");

        limitedUsesCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                limitedUsesCheckBoxActionPerformed(evt);
            }
        });
        limitedUsesCheckBox.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                limitedUsesCheckBoxPropertyChange(evt);
            }
        });

        totalUsesLabel.setText(" Total:");

        usesField.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        usesField.setColumns(3);
        usesField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter()));
        usesField.setEnabled(false);

        javax.swing.GroupLayout usesPanelLayout = new javax.swing.GroupLayout(usesPanel);
        usesPanel.setLayout(usesPanelLayout);
        usesPanelLayout.setHorizontalGroup(
            usesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(usesPanelLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(totalUsesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, usesPanelLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(usesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(usesPanelLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(usesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(usesPanelLayout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addComponent(limitedUsesCheckBox)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(usesPanelLayout.createSequentialGroup()
                        .addComponent(limitedUsesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(6, 6, 6))))
        );
        usesPanelLayout.setVerticalGroup(
            usesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(usesPanelLayout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(limitedUsesLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(limitedUsesCheckBox)
                .addGap(9, 9, 9)
                .addComponent(totalUsesLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(usesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        publicLabel.setText("Public:");

        attributeLabel.setText("Attribute:");

        subtypeLabel.setText("Subtype:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(addResultButton))
                    .addComponent(logPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(resultTextLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(publicLabel))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(resultTextField)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(publicCheckBox)
                        .addGap(8, 8, 8))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(resultTypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(attributeLabel)
                            .addComponent(subtypeLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(objectComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(attributeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(usesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(9, 9, 9)
                        .addComponent(exitsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(placeablesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(quantityPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(modifierPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(locationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(resultTextLabel)
                    .addComponent(publicLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(resultTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(publicCheckBox))
                .addGap(7, 7, 7)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(resultTypePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(objectComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(subtypeLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(attributeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(attributeLabel))
                        .addGap(8, 8, 8)))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(usesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(exitsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(placeablesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(quantityPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(modifierPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(locationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(logPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(addResultButton))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
        dispose();
    }//GEN-LAST:event_cancelButtonActionPerformed

    private void addResultButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addResultButtonActionPerformed
        addResult();
        dispose();
    }//GEN-LAST:event_addResultButtonActionPerformed

    private void closedDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closedDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_closedDActionPerformed

    private void lockedEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lockedEActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_lockedEActionPerformed

    private void closedUActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closedUActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_closedUActionPerformed

    private void closedNActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closedNActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_closedNActionPerformed

    private void attributeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_attributeComboBoxActionPerformed
        setEnabledBoxes();
    }//GEN-LAST:event_attributeComboBoxActionPerformed

    private void objectComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_objectComboBoxActionPerformed
        updateObjectBox();
    }//GEN-LAST:event_objectComboBoxActionPerformed

    private void textRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textRadioActionPerformed
        if (textRadio.isSelected()) {
            updateSubtypeBoxes();
        }
    }//GEN-LAST:event_textRadioActionPerformed

    private void textRadioPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_textRadioPropertyChange

    }//GEN-LAST:event_textRadioPropertyChange

    private void spawnRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_spawnRadioActionPerformed
        if (spawnRadio.isSelected()) {
            updateSubtypeBoxes();
        }
    }//GEN-LAST:event_spawnRadioActionPerformed

    private void spawnRadioPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_spawnRadioPropertyChange

    }//GEN-LAST:event_spawnRadioPropertyChange

    private void modifyRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_modifyRadioActionPerformed
        if (modifyRadio.isSelected()) {
            updateSubtypeBoxes();
        }
    }//GEN-LAST:event_modifyRadioActionPerformed

    private void modifyRadioPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_modifyRadioPropertyChange

    }//GEN-LAST:event_modifyRadioPropertyChange

    private void publicCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_publicCheckBoxActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_publicCheckBoxActionPerformed

    private void publicCheckBoxPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_publicCheckBoxPropertyChange
        // TODO add your handling code here:
    }//GEN-LAST:event_publicCheckBoxPropertyChange

    private void limitedUsesCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_limitedUsesCheckBoxActionPerformed
        toggleLimitedUses();
    }//GEN-LAST:event_limitedUsesCheckBoxActionPerformed

    private void limitedUsesCheckBoxPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_limitedUsesCheckBoxPropertyChange

    }//GEN-LAST:event_limitedUsesCheckBoxPropertyChange

    private void blockedWActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_blockedWActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_blockedWActionPerformed

    private void closedEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closedEActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_closedEActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addResultButton;
    private javax.swing.JComboBox attributeComboBox;
    private javax.swing.JLabel attributeLabel;
    private javax.swing.JCheckBox blockedD;
    private javax.swing.JCheckBox blockedE;
    private javax.swing.JCheckBox blockedN;
    private javax.swing.JCheckBox blockedS;
    private javax.swing.JCheckBox blockedU;
    private javax.swing.JCheckBox blockedW;
    private javax.swing.JButton cancelButton;
    private javax.swing.JCheckBox closedD;
    private javax.swing.JCheckBox closedE;
    private javax.swing.JLabel closedLabel;
    private javax.swing.JCheckBox closedN;
    private javax.swing.JCheckBox closedS;
    private javax.swing.JCheckBox closedU;
    private javax.swing.JCheckBox closedW;
    private javax.swing.JTextArea compEntryDescBox;
    private javax.swing.JLabel compEntryDescLabel;
    private javax.swing.JTextArea entryDescBox;
    private javax.swing.JLabel entryDescLabel;
    private javax.swing.JPanel exitsPanel;
    private javax.swing.JLabel idLabel1;
    private javax.swing.JLabel idLabel2;
    private javax.swing.JLabel idLabel3;
    private javax.swing.JFormattedTextField integerField;
    private javax.swing.JFormattedTextField itemField;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JCheckBox limitedUsesCheckBox;
    private javax.swing.JLabel limitedUsesLabel;
    private javax.swing.JPanel locationPanel;
    private javax.swing.JCheckBox lockedD;
    private javax.swing.JCheckBox lockedE;
    private javax.swing.JLabel lockedLabel;
    private javax.swing.JLabel lockedLabel1;
    private javax.swing.JCheckBox lockedN;
    private javax.swing.JCheckBox lockedS;
    private javax.swing.JCheckBox lockedU;
    private javax.swing.JCheckBox lockedW;
    private javax.swing.JPanel logPanel;
    private javax.swing.JFormattedTextField mobileField;
    private javax.swing.JPanel modifierPanel;
    private javax.swing.JRadioButton modifyRadio;
    private javax.swing.JComboBox objectComboBox;
    private javax.swing.JPanel placeablesPanel;
    private javax.swing.JCheckBox publicCheckBox;
    private javax.swing.JLabel publicLabel;
    private javax.swing.JFormattedTextField quantityField;
    private javax.swing.JPanel quantityPanel;
    private javax.swing.JFormattedTextField resultTextField;
    private javax.swing.JLabel resultTextLabel;
    private javax.swing.JPanel resultTypePanel;
    private javax.swing.JFormattedTextField skillField;
    private javax.swing.JLabel skillLevel;
    private javax.swing.JRadioButton spawnRadio;
    private javax.swing.JLabel subtypeLabel;
    private javax.swing.JFormattedTextField textField;
    private javax.swing.JRadioButton textRadio;
    private javax.swing.JLabel totalUsesLabel;
    private javax.swing.JFormattedTextField triggerField;
    private javax.swing.ButtonGroup typeGroup;
    private javax.swing.JFormattedTextField usesField;
    private javax.swing.JPanel usesPanel;
    private javax.swing.JFormattedTextField xField;
    private javax.swing.JLabel xLabel;
    private javax.swing.JFormattedTextField yField;
    private javax.swing.JLabel yLabel;
    private javax.swing.JFormattedTextField zField;
    private javax.swing.JLabel zLabel;
    // End of variables declaration//GEN-END:variables
}
